package edu.indiana.cs.b534.torrent.impl;

import edu.indiana.cs.b534.torrent.TorrentException;

public class TrackerUpdater extends Thread{
	private TorrentManager manager;
	
	
	public TrackerUpdater(TorrentManager manager) {
		super();
		this.manager = manager;
		this.setDaemon(true);
	}


	@Override
	public void run() {
		while(true){
			try {
				manager.updateFromTracker();
				Thread.sleep(60000);
			} catch (TorrentException e) {
				e.printStackTrace();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
	
}
